<!doctype html>

<%@ page import="com.checkfree.isolutions.customer.persist.*" %>
<%@ page import="com.checkfree.isolutions.statement.*" %>
<%@ page import="com.checkfree.isolutions.statement.persist.*" %>
<%@ page import="com.myebills.ebpsfrontend.cust.utils.*" %>
<%@ page import="com.myebills.ebpsfrontend.cust.controller.*" %>
<%@ page import="com.checkfree.isolutions.property.Properties" %>
<%@ page import="com.checkfree.isolutions.property.PropertiesConfig" %>
<%@ page import="java.util.*" %>
<%@ page import="java.net.*" %>
<%@ page import="java.text.*" %>

<!-- HTML5 Boilerplate -->
<!--[if lt IE 7]><html class="no-js lt-ie9 lt-ie8 lt-ie7" lang="en"> <![endif]-->
<!--[if (IE 7)&!(IEMobile)]><html class="no-js lt-ie9 lt-ie8" lang="en"><![endif]-->
<!--[if (IE 8)&!(IEMobile)]><html class="no-js lt-ie9" lang="en"><![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" lang="en"><!--<![endif]-->

<head>
<meta charset="utf-8">

<title>Maxis Manage Bills</title>

<meta name="description" content="" />
<meta name="author" content="" />
<meta name="HandheldFriendly" content="True" />
<meta name="MobileOptimized" content="320" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta http-equiv="cleartype" content="on" />
<meta http-equiv="X-UA-Compatible" content="IE=edge"> 
<link href="js/jquery.mCustomScrollbar.css" rel="stylesheet" type="text/css" />
<link href="css/master.css" rel="stylesheet" type="text/css" />

<script src="js/modernizr-2.5.3-respond-1.1.0.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script>
<script>window.jQuery || document.write('<script src="js/jquery-1.8.2.min.js"><\/script>')</script>

<link rel="shortcut icon" href="/favicon.ico">

</head>

<body class="clearfix" style="background:transparent;">

<iframe id="helpframe" src='' height='0' width='0' frameborder='0'></iframe>

<script type="text/javascript">
  function iframeResizePipe()
  {
     // What's the page height?
     var height = document.documentElement.scrollHeight;

     // Going to 'pipe' the data to the parent through the helpframe..
     var pipe = document.getElementById('helpframe');

     // Cachebuster a precaution here to stop browser caching interfering
     //pipe.src = 'https://new.maxis.com.my/content/dam/maxis/html/helper.html?height='+height+'&cacheb='+Math.random();
	 pipe.src = 'http://10.21.10.34/content/dam/maxis/html/helper.html?height='+height+'&cacheb='+Math.random();
	 //pipe.src = 'http://localhost:8080/cust_sso/helper.htm?height='+height+'&cacheb='+Math.random();
     //pipe.src = 'https://www.maxis.com.my/content/dam/maxis/html/helper.html?height='+height+'&cacheb='+Math.random();
  }
</script>
<%	
	//Get attribute from session for the logon user
	final String forwardfrom = (String) request.getAttribute("forwardFrom");
	
    final EbppxEcsUser ecsUser = (EbppxEcsUser) session.getAttribute(EbppxConstants.ECS_USER);
	final String marketSegment = (String) ecsUser.getMSegment();
	final com.checkfree.isolutions.statement.persist.Statement cfiStatement = (com.checkfree.isolutions.statement.persist.Statement)request.getAttribute(EbppxConstants.CFI_STATEMENTS);
	String url = "";
	
	if( cfiStatement != null && marketSegment != null && forwardfrom.indexOf("CusBillList_v1r00") > 0){
		String stmtDate = DateUtil.formatDate(cfiStatement.getDate(),EbppxConstants.DATE_FORMAT);
		url = marketSegment+"//"+marketSegment+"_TelSumm";
		url = url + EbppxUtil.getVersion(url,stmtDate) + ".jsp";
	} else if( marketSegment != null && forwardfrom.indexOf("CompareBill_v1r00") > 0){
		url = marketSegment+"//"+marketSegment+"_TelComp_v1r00.jsp";
	} else{
		url = "Error.jsp";
	}
	
%>

<jsp:include page="<%= url %>" />

<script src="js/jquery-ui-1.9.2.custom.min.js"></script> 
<script src="js/plugins.js"></script>
<script src="js/helper.js"></script>
<script src="js/jquery.easing.js"></script>
<script src="js/jquery.flexslider-min.js"></script>
<script src="js/jquery.fancybox.js" type="text/javascript"></script>
<script src="js/jquery.mousewheel.min.js"></script>
<script src="js/jquery.mCustomScrollbar.min.js"></script>
<script src="js/jquery.ui.datepicker.js"></script>
<script src="js/jquery-ui-timepicker-addon.js"></script>
<script src="js/jquery.form.js"></script>

</body>
</html>